/* WorksPage.css - 资源页面组件样式 */
/* 在原有的WorksPage.css基础上添加以下样式 */

/* ========== 图片组件样式 ========== */
.work-cover,
.detail-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-glass);
}

.work-cover {
    height: 180px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.detail-cover {
    width: 100%;
    height: 300px;
    border-radius: var(--radius-lg);
}

.work-cover img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.work-cover img:hover {
    transform: scale(1.05);
}

/* 占位符样式 */
.cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-gray-light);
    opacity: 0.5;
    font-size: 3rem;
    background: var(--bg-glass);
    transition: all 0.3s ease;
}

.cover-placeholder.large {
    font-size: 4rem;
}

/* 加载状态样式 */
.cover-placeholder.loading {
    animation: imageLoading 1.5s infinite;
    color: var(--primary-purple);
    opacity: 0.8;
}

@keyframes imageLoading {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* 图片加载失败状态 */
.cover-placeholder.error {
    color: var(--text-gray-light);
    opacity: 0.3;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
}

.cover-placeholder.error:hover {
    opacity: 0.5;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
}

/* 确保图片容器的样式一致性 */
.work-card .work-cover {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.detail-grid .detail-cover {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
}

/* 图片加载优化 */
.work-cover img,
.detail-cover img {
    opacity: 0;
    animation: fadeInImage 0.3s ease-in-out forwards;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.works-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-xl);
}

/* ========== 页面头部 ========== */
.works-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-glass);
}

.works-title h1 {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-white);
    margin-bottom: var(--spacing-sm);
}

.works-title p {
    color: var(--text-gray-light);
    font-size: 1rem;
}

.create-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--primary-purple);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.create-btn:hover {
    background: var(--purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* ========== 搜索和筛选区域 ========== */
.search-filter-area {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-glass-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass-light);
}

.search-bar {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.search-input {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}

.search-input::placeholder {
    color: var(--text-gray-light);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--primary-purple);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--purple-dark);
    transform: translateY(-1px);
}

.tags-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-md);
}

.tags-label {
    color: var(--text-white);
    font-weight: 500;
    white-space: nowrap;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    flex: 1;
}

.tag-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-glass);
    color: var(--text-gray-light);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

.tag-btn:hover {
    background: var(--bg-glass-light);
    color: var(--text-white);
    transform: translateY(-1px);
}

.tag-btn.active {
    background: var(--primary-purple);
    color: var(--text-white);
    border-color: var(--primary-purple);
}

.clear-tags-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

.clear-tags-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* ========== 标签页 ========== */
.tabs-container {
    margin-bottom: var(--spacing-xl);
}

.tabs {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-glass-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass-light);
}

.tab {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    background: transparent;
    color: var(--text-gray-light);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.tab:hover {
    background: var(--bg-glass);
    color: var(--text-white);
    transform: translateY(-1px);
}

.tab.active {
    background: var(--primary-purple);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

/* ========== 资源网格 ========== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.work-card {
    position: relative;
    background: var(--bg-glass-light);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-color: var(--border-glass-light);
}

/* 促销和拥有标识 */
.promotion-badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: linear-gradient(135deg, #f59e0b, #eab308);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.owned-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.work-cover {
    height: 180px;
    background: var(--bg-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.work-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder {
    font-size: 3rem;
    color: var(--text-gray-light);
    opacity: 0.5;
}

.cover-placeholder.large {
    font-size: 4rem;
}

.work-info {
    padding: var(--spacing-lg);
}

.work-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.work-description {
    color: var(--text-gray-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-meta {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.meta-label {
    color: var(--text-gray-light);
}

.meta-value {
    color: var(--text-white);
    font-weight: 500;
}

.work-actions {
    display: flex;
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 80px;
}

.detail-btn {
    background: var(--bg-glass);
    color: var(--text-white);
    border: 1px solid var(--border-glass);
}

.detail-btn:hover {
    background: var(--bg-glass-light);
    transform: translateY(-1px);
}

.download-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.download-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
}

.purchase-btn {
    background: linear-gradient(135deg, #f59e0b, #eab308);
    color: white;
}

.purchase-btn:hover {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    transform: translateY(-1px);
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

.promotion-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.promotion-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-1px);
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-gray-light);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.125rem;
}

/* ========== 模态框 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-lg);
}

.modal {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-glass);
}

.modal-header h2 {
    color: var(--text-white);
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-gray-light);
    cursor: pointer;
    font-size: 1.25rem;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--bg-glass-light);
    color: var(--text-white);
}

.modal-content {
    padding: var(--spacing-lg);
}

.modal-actions {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-glass);
    justify-content: flex-end;
}

/* ========== 表单样式 ========== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    color: var(--text-white);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-gray-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input[type="file"] {
    padding: var(--spacing-sm);
    cursor: pointer;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: var(--spacing-sm);
}

/* 标签选择器样式 */
.tag-selection-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.tag-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.fetch-tags-btn,
.add-custom-tag-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary-purple);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.fetch-tags-btn:hover:not(:disabled),
.add-custom-tag-btn:hover {
    background: var(--purple-dark);
    transform: translateY(-1px);
}

.fetch-tags-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.add-custom-tag-btn {
    background: var(--bg-glass);
    color: var(--text-white);
    border: 1px solid var(--border-glass);
}

.add-custom-tag-btn:hover {
    background: var(--bg-glass-light);
}

.tag-selector {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    max-height: 300px;
    overflow-y: auto;
}

.tag-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-glass);
}

.tag-selector-header span {
    color: var(--text-white);
    font-weight: 500;
}

.close-selector-btn {
    background: none;
    border: none;
    color: var(--text-gray-light);
    cursor: pointer;
    font-size: 1rem;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.close-selector-btn:hover {
    background: var(--bg-glass-light);
    color: var(--text-white);
}

.available-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.available-tag-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-glass-light);
    color: var(--text-white);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

.available-tag-btn:hover:not(:disabled) {
    background: var(--primary-purple);
    border-color: var(--primary-purple);
    transform: translateY(-1px);
}

.available-tag-btn.selected {
    background: var(--success);
    border-color: var(--success);
    opacity: 0.7;
    cursor: not-allowed;
}

.available-tag-btn:disabled {
    cursor: not-allowed;
}

/* 标签输入（保留原样式，但调整容器名称） */
.tag-input-container {
    display: flex;
    gap: var(--spacing-sm);
}

.tag-input-container input {
    flex: 1;
}

.add-tag-btn {
    padding: var(--spacing-md);
    background: var(--primary-purple);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-tag-btn:hover {
    background: var(--purple-dark);
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.selected-tag {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--primary-purple);
    color: var(--text-white);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.remove-tag-btn {
    background: none;
    border: none;
    color: var(--text-white);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    margin-left: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.remove-tag-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========== 按钮样式 ========== */
.cancel-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-glass);
    color: var(--text-white);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.cancel-btn:hover {
    background: var(--bg-glass-light);
    transform: translateY(-1px);
}

.submit-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--primary-purple);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.submit-btn:hover {
    background: var(--purple-dark);
    transform: translateY(-1px);
}

/* ========== 详情页面 ========== */
.detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-xl);
}

.detail-left {
    display: flex;
    flex-direction: column;
}

.detail-cover {
    width: 100%;
    height: 300px;
    background: var(--bg-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-right h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: var(--spacing-md);
}

.detail-description {
    color: var(--text-gray-light);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.detail-meta-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.detail-meta-item .label {
    color: var(--text-gray-light);
    font-size: 0.875rem;
    font-weight: 500;
}

.detail-meta-item .value {
    color: var(--text-white);
    font-weight: 600;
}

.detail-meta-item .value.hash {
    font-family: monospace;
    font-size: 0.75rem;
    word-break: break-all;
    background: var(--bg-glass-light);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
}

.detail-meta-item .value.promotion {
    color: #f59e0b;
    font-weight: 700;
}

/* ========== 促销预览 ========== */
.promotion-preview {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.promotion-preview h4 {
    color: var(--text-white);
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
}

.promotion-preview p {
    color: var(--text-gray-light);
    font-style: italic;
}

/* ========== 消息样式 ========== */
.message {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.message.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ========== 加载状态 ========== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-gray-light);
    gap: var(--spacing-md);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-glass);
    border-top: 3px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== 响应式设计 ========== */
@media (max-width: 1200px) {
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .works-container {
        padding: var(--spacing-md);
    }

    .works-header {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
    }

    .works-title h1 {
        font-size: 1.75rem;
    }

    .search-filter-area {
        padding: var(--spacing-md);
    }

    .search-bar {
        flex-direction: column;
    }

    .tags-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .tags-list {
        justify-content: center;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        text-align: center;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .work-actions {
        flex-direction: column;
    }

    .action-btn {
        min-width: auto;
    }

    .modal {
        margin: var(--spacing-md);
        max-width: none;
        width: auto;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        height: 200px;
    }

    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }

    .tag-input-container {
        flex-direction: column;
    }

    /* 标签选择器移动端适配 */
    .tag-actions {
        flex-direction: column;
    }

    .fetch-tags-btn,
    .add-custom-tag-btn {
        justify-content: center;
    }

    .available-tags {
        justify-content: center;
    }

    .tag-selector {
        max-height: 250px;
    }

    .promotion-badge,
    .owned-badge {
        position: static;
        display: inline-block;
        margin: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .works-title h1 {
        font-size: 1.5rem;
    }

    .works-grid {
        gap: var(--spacing-md);
    }

    .work-card {
        margin-bottom: var(--spacing-md);
    }

    .work-info {
        padding: var(--spacing-md);
    }

    .work-name {
        font-size: 1.125rem;
    }

    .modal-overlay {
        padding: var(--spacing-sm);
    }

    .modal-header,
    .modal-content,
    .modal-actions {
        padding: var(--spacing-md);
    }

    .selected-tags {
        gap: var(--spacing-xs);
    }

    .selected-tag {
        font-size: 0.75rem;
        padding: var(--spacing-xs);
    }
}